Skip to content

perf(screening): Papers' counts under one narrowing, and the overview's pace, read the counts kept for them - #1617

Merged
sickerine merged 3 commits into
devfrom
perf/screening-counts-read
Nov 28, 2026
Merged

sickerine merged 3 commits into
devfrom
perf/screening-counts-read

Conversation

@sickerine

Copy link
Copy Markdown
Collaborator

This is step two of two. Since #1616 the counts are kept by triggers. Its backfill ran on shared dev, counting 40,288 papers and 29,911 votes, and migrations/screeningFacets:verify returned 0 missing entries at 08:27 UTC.

The figures below come from convex/bench/screening-team.bench.ts (5,000 papers, two reviewers), and every count was checked against the cards and votes read whole:

Read Before After
Tab counts, one reviewer 10,009 docs, 2.8 MB 252 docs, 273 KB
Tab counts, one reviewer voted Include 6,676 docs, 1.7 MB 92 docs, 93 KB
Tab counts, one source 5,009 docs, 1.2 MB 162 docs, 170 KB
Overview's votes of the last days 1,012 docs, 314 KB 58 docs, 58 KB

The counts query runs again on every vote in the screening, so this is the read behind a slow reviewer filter on a large screening.

  • paperViews.counts: a single narrowing (one reviewer with or without a way of voting, one source, one check or one reason) reads the aggregate. Two narrowings at once still count the cards one by one, which is noted as a ponytail: comment.
  • view.figures: each person's votes since since are counted, no longer capped at 500 reads.
  • The counts trail a vote by a moment, because a batch worker applies them. cards.test.ts lets that worker run before reading.

Checks:

  • tsc, check:convex-rules, check:module-weight and check:user-actions pass.
  • Vitest on screening, migrations and sharing: 330 pass.
  • convex/limits/maxSizeScreening.test.ts: all 5 size tests pass, including ten reviewers on 5,000 papers and thirty reviewers settled by the first vote.

…'s pace, read the counts kept for them

Step two of two. The counts are kept since #1616, and its backfill checked clean on shared dev
(migrations/screeningFacets:verify returned 0 at 08:27 UTC).

At 5,000 papers with two reviewers (convex/bench/screening-team.bench.ts), each count checked against the cards and
votes read whole:
- tab counts under one reviewer: 10,009 documents (2.8 MB) a read to 252 (273 KB)
- under one reviewer voted include: 6,676 (1.7 MB) to 92 (93 KB)
- under one source: 5,009 (1.2 MB) to 162 (170 KB)
- the overview's votes of the last days: 1,012 (314 KB) to 58 (58 KB)

Narrowed two ways at once, Papers still counts the cards one by one. The counts are a moment behind a vote, so
cards.test.ts lets their worker run before it reads them.
@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c4a6887b-3df8-4562-906c-c43387676539
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-28T08:34:30.113245Z b1f1973 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…a model's vote not yet decided

As the old count did: a model's vote is cast before the bookkeeping works out its decision, and is counted under
`cast` until then (#1618).
@sickerine
sickerine merged commit 6fb1ad1 into dev Nov 28, 2026
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant